<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试</title>

    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">

</head>
<style>
    .main{
        padding: 0 0.5rem;
        overflow: hidden;
        display: -webkit-flex;
        flex-wrap: wrap;
        align-content:flex-start;
        background-color: chocolate;
    }
    .main .item{
        line-height: 3.5rem;
        background-color: #ddd;
    }
</style>
<body>
    <div class="main">
        <div class="item" style="width:100px">width:100px;</div>
        <div class="item" style="flex:2">flex: 2;</div>
        <div class="item" style="flex:1">flex: 1;</div>

    </div>
</body>
</html>